import request from '@/utils/request'

// 查询企业详细
export function getBasisById(id) {
  return request({
    url: '/sys/enterprise/selectById/' + id,
    method: 'get'
  })
}

// 查询列表信息
export function listBasis(query) {
  return request({
    url: '/sys/enterprise/list',
    method: 'post',
    params: query
  })
}

// 修改企业基本信息
export function remove(params) {
  return request({
    url: '/sys/enterprise/remove',
    method: 'post',
    params
  })
}

// 修改企业基本信息
export function updateBasis(data) {
  return request({
    url: '/sys/enterprise/update',
    method: 'post',
    data
  })
}

// 添加企业
export function addBasis(data) {
  return request({
    url: '/sys/enterprise/add',
    method: 'post',
    params: data
  })
}

// 企业信用代码查重校验
export function checkEccUnique(id, creditCodePic) {
  const data = {
    'id': id,
    'creditCodePic': creditCodePic
  }
  return request({
    url: '/sys/enterprise/checkEccUnique',
    method: 'post',
    params: data
  })
}
